package demo;
public class Main {
    static class SubThread extends Thread{
        @Override
        public void run() {

             while(true){
                 System.out.println("A");
             }
        }
    }
    public static void main(String[] args) {

        SubThread subThread=new SubThread();
        subThread.start();;

        while(true){
            System.out.println("B");
        }
    }
}
